<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>也许有用 技术论坛 - MAYBE IT WORKS</title>
    <link th:href="@{/show/css/bootstrap.min.css}" type="text/css" rel="stylesheet">
    <link th:href="@{/show/css/style.css}" type="text/css" rel="stylesheet">
    <link th:href="@{/show/css/nprogress.css}" type="text/css" rel="stylesheet">

    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js" type="text/javascript"></script>
    <script src="js/respond.min.js" type="text/javascript"></script>
    <script src="js/selectivizr-min.js" type="text/javascript"></script>
    <![endif]-->
    <link rel="apple-touch-icon-precomposed" th:href="@{/show/images/icon/icon.png}">
    <link rel="shortcut icon" th:href="@{/show/images/icon/favicon.ico}">
    <meta name="Keywords" content="" />
    <meta name="description" content="" />
    <link rel="stylesheet" th:href="@{/show/css/imgSizeSmall.css}">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"/>
    <script th:src="@{/layui/layui.js}"></script>
    <style>
        .line-tip{
            font-size: 14px;
            margin-top: 10px;
            margin-left: 10px;
        }
    </style>
</head>

<body>
<section class="container user-select">
    <header th:replace="~{show/main :: leftbar}"></header>
    <!--/超小屏幕可见-->
    <div class="content-wrap"><!--内容-->
        <div class="content">
            <header class="news_header">
                <h2 th:text="${'程序员老黄历 '+calendar.getTitle()}">欢迎来到异清轩技术博客</h2>
                <ul>
                    <li >程序员老黄历</li>
                    <li th:text="'也许有用发布于'+${#dates.format(calendar.getCreateTime(),'yyyy-MM-dd HH:mm:ss')}">发布于 2015-06-29</li>
                </ul>
            </header>
            <article class="news_content">

                <div>
                    <div style="width: 400px;margin: 0 auto; align-items: center;">
                        <div style="color: #bbb;background-color: #555;font-weight: bold;">
                            程序员老黄历
                            <sup>Beta</sup>
                        </div>
                        <div style="font-size: 17pt;font-weight: bold;line-height: 30pt;text-align: center;" th:text="${'今天是'+calendar.getTitle()}"></div>
                        <div >
                            <table style="width: 100%;height: 100px">
                                <tr>
                                    <td style="width:100px;background-color: #ffee44;font-weight: bold;text-align: center;font-size: 30pt;">宜</td>
                                    <td style="background-color: #ffffaa; font-weight: bold; padding-left: 10px">
                                        <ul>
                                            <li th:each="good:${calendar.getGoodList()}" th:text="${good}"></li>
                                        </ul>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div>
                            <table style="width: 100%;height: 100px">
                                <tr>
                                    <td style="width:100px; background-color: #ff4444;font-weight: bold;text-align: center;font-size: 30pt;color: #fff">忌</td>
                                    <td style="background-color: #ffddd3; font-weight: bold; padding-left: 10px">
                                        <ul>
                                            <li th:each="bad:${calendar.getBadList()}" th:text="${bad}"></li>
                                        </ul>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="line-tip"><strong>座位朝向：</strong>面向<span style="color: #4a4;font-weight: bold" th:text="${calendar.getDirections()}">东北方</span>写程序，BUG 最少。</div>
                        <div class="line-tip"><strong>今日宜饮：</strong><span class="drink_value" th:text="${calendar.getDrink()}">水,可乐</span></div>
                        <div class="line-tip"><strong>女神亲近指数：</strong><span class="goddes_value" th:text="${calendar.getNumber()}">3.1</span></div>
                    </div>
                    <br>
                    <br>
                </div>
                <ol>
                    <li>1、本老黄历仅面向程序员；</li>
                    <li>2、本老黄历内容是程序生成的，因为只有这样程序员才会信；</li>
                    <li>3、源码：Java 版 程序员老黄历</li>
                </ol>
            </article>
        </div>
    </div>
    <!--/内容-->
    <aside th:replace="~{show/main :: rightbar}"><!--右侧>992px显示-->

    </aside>
    <!--/右侧>992px显示-->
    <footer th:replace="~{show/main :: bottombar}"></footer>
</section>
<div><a href="javascript:;" class="gotop" style="display:none;"></a></div>
<!--/返回顶部-->
<script th:src="@{/show/js/jquery-2.1.4.min.js}" type="text/javascript"></script>
<script th:src="@{/show/js/nprogress.js}" type="text/javascript" ></script>
<script th:src="@{/show/js/bootstrap.min.js}" type="text/javascript"></script>
<script th:src="@{/show/js/comm/right.js}" type="text/javascript"></script>
<script type="text/javascript"  th:inline="javascript">
    //页面加载
    $('body').show();
    $('.version').text(NProgress.version);
    NProgress.start();
    setTimeout(function() { NProgress.done(); $('.fade').removeClass('out'); }, 1000);
    //返回顶部按钮
    $(function(){
        $(window).scroll(function(){
            if($(window).scrollTop()>100){
                $(".gotop").fadeIn();
            }
            else{
                $(".gotop").hide();
            }
        });
        $(".gotop").click(function(){
            $('html,body').animate({'scrollTop':0},500);
        });
    });
    //提示插件启用
    $(function () {
        $('[data-toggle="popover"]').popover();
    });
    $(function () {
        $('[data-toggle="tooltip"]').tooltip();
    });
    //鼠标滑过显示 滑离隐藏
    //banner
    $(function(){
        $(".carousel").hover(function(){
            $(this).find(".carousel-control").show();
        },function(){
            $(this).find(".carousel-control").hide();
        });
    });
    //本周热门
    $(function(){
        $(".hot-content ul li").hover(function(){
            $(this).find("h3").show();
        },function(){
            $(this).find("h3").hide();
        });
    });
    //相关推荐
    $(function(){
        $(".related-content ul li").hover(function(){
            $(this).find("h3").show();
        },function(){
            $(this).find("h3").hide();
        });
    });
    //页面元素智能定位
    $.fn.smartFloat = function() {
        var position = function(element) {
            var top = element.position().top; //当前元素对象element距离浏览器上边缘的距离
            var pos = element.css("position"); //当前元素距离页面document顶部的距离
            $(window).scroll(function() { //侦听滚动时
                var scrolls = $(this).scrollTop();
                if (scrolls > top) { //如果滚动到页面超出了当前元素element的相对页面顶部的高度
                    if (window.XMLHttpRequest) { //如果不是ie6
                        element.css({ //设置css
                            position: "fixed", //固定定位,即不再跟随滚动
                            top: 0 //距离页面顶部为0
                        }).addClass("shadow"); //加上阴影样式.shadow
                    } else { //如果是ie6
                        element.css({
                            top: scrolls  //与页面顶部距离
                        });
                    }
                }else {
                    element.css({ //如果当前元素element未滚动到浏览器上边缘，则使用默认样式
                        position: pos,
                        top: top
                    }).removeClass("shadow");//移除阴影样式.shadow
                }
            });
        };
        return $(this).each(function() {
            position($(this));
        });
    };
    //启用页面元素智能定位
    $(function(){
        $("#search").smartFloat();
    });
</script>

</body>
</html>
